import axios from 'axios'

const baseURL = 'http://127.0.0.1:3007'
const server = axios.create({
  baseURL,
  timeout: 3000
})

// 请求拦截
server.interceptors.request.use(request => {
  console.log('请求拦截器1:', request)
  return request
})

// 响应拦截
server.interceptors.response.use(response => {
  console.log('响应拦截器2:', response)
  return response.data
})

export default server
